import Vue from 'vue';
import VueI18n from 'vue-i18n';
import store from '@/store/index';

Vue.use(VueI18n);

export const i18n = new VueI18n({
    locale: store.state.lang.value || 'en',
    messages: {
        'zh-CN': require('./setting/zh'),
        en: require('./setting/en'),
        es: require('./setting/es'),
        pt: require('./setting/pt'),
        ja: require('./setting/ja'),
        ko: require('./setting/ko'),
        hi: require('./setting/hi'),
        de: require('./setting/de'),
        ar: require('./setting/ar'),
        ru: require('./setting/ru'),
        tw: require('./setting/tw'),
        // fr: require('./setting/fr'),
        vi: require('./setting/vi')
    }
});

export default i18n;
